//
//  MedicalTableViewCell.m
//  CleanerAir_Project
//
//  Created by 付亚杰 on 16/5/17.
//  Copyright © 2016年 Beijing Colin El Internet. All rights reserved.
//

#import "MedicalTableViewCell.h"

@interface MedicalTableViewCell()

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageHeight;

@property (weak, nonatomic) IBOutlet UIImageView *myImageView;

@property (weak, nonatomic) IBOutlet UILabel *headerLable;

@property (weak, nonatomic) IBOutlet UILabel *introductionLabel;

@property (weak, nonatomic) IBOutlet UIView *myView;//带有虚线的View
@end

@implementation MedicalTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(MedicalModel *)model{
    
    if (model != nil) {
        _model = model;
        
        self.imageHeight.constant = MAIN_WIDTH / 375 * 152;
        
        [self.myImageView sd_setImageWithURL:[NSURL URLWithString:model.thumb] placeholderImage:[UIImage imageNamed:@"爱康占位图.png"]];
        
        self.headerLable.text = model.name;
        
        self.introductionLabel.text = model.desc;
        
        [self.myView.layer setBorderColor:CGColorCreate(CGColorSpaceCreateDeviceRGB(),(CGFloat[]){ 240/255, 240/255, 240/255, 0.2 })];
        
    }
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
